﻿using System.Data;
using System.Data.SqlClient;
using LoverMeeting.Model.Entity;

namespace LoverMeeting.DataBase.DataMappers
{
    public class ProvinceMapper : IDataMapper<Province>
    {
        public Province GetData(IDataReader reader)
        {
            var entity = new Province
                             {
                                 Code = reader["ProvinceId"].ToString(),
                                 Name = reader["ProvinceName"].ToString()
                             };
            return entity;
        }

        public void SetParameter(SqlCommand command, Province entity)
        {
            throw new System.NotImplementedException();
        }

        public int GetRecordCount(IDataReader reader)
        {
            throw new System.NotImplementedException();
        }
    }
}
